{% extends "../base.html" %}
{% block page_title %}分红礼包查询{% end %}

{% block content %}

<div class="countgo pull-left">
    <div class="zt">
        <!--MAN -->
        {%set level_dict={0:"初级礼包",1:"中级礼包",2:"高级礼包"}%}
        <div class="remain" style="height: 553px;">
            <div class="gao1"></div>
            <div class="page-header long-header">
                <h3>礼包管理
                    <small> 分红礼包查询</small>
                </h3>
            </div>
            <div>
                <ol class="breadcrumb">
                    <li><span class="glyphicon glyphicon-home" aria-hidden="true"></span> <a href="/user/home">主页</a>
                    </li>
                    <li><a href="#">礼包管理</a></li>
                    <li class="active">分红礼包查询</li>
                </ol>
            </div>
            <div class="panel panel-default">
                <div class="panel-heading">分红礼包查询</div>
                <div class="panel-body">
                    <!--====================-->
                    <div class="row">
                        <table class="table table-striped table-hover">
                            <tbody>
                            <tr>
                                <td>礼包编号</td>
                                <td>礼包等级</td>
                                <td>购买时间</td>
                                <td>已返利天数</td>
                                <td>剩余返利天数</td>
                            </tr>
                            {%if my_pets.count()==0%}
                            <tr>
                                <td colspan="5">暂无记录</td>
                            </tr>
                            {%else%}
                            {%for p in my_pets%}
                            {%set pet=pet_info(p['pid'])%}
                            {%if not pet%}
                            {%continue%}
                            {%end%}
                            {%set current_day=cal_life_day(p.get('time')) %}
                            <tr>
                                <td>{{p.get('id','')}}</td>
                                <td>{{pet.get('name','')}}</td>
                                <td>{{p.get('time')}}</td>
                                <td>{{p.get('life_day',0)}}
                                </td>
                                <td>{{pet.get('life') -p.get('life_day',0)}}</td>
                            </tr>
                            {%end%}
                            {%end%}
                            </tbody>
                        </table>

                    </div>


                    <!--====================-->

                </div>
            </div>
        </div>
        <!--MAN End-->
    </div>
</div>

{%end%}
